package jpa.dsl.boot.model2;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "t2_hotel", schema = "jpa_dsl", catalog = "")
public class THotel {
    //省略JPA注解标识
    @Id
    @GeneratedValue
    private int id;
    private String name;
    private String address;
    private Integer city;//保存着城市的id主键
}
